home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / printer.arc / PRINTER.DOC < prev   
Text File  |  1984-01-08  |  10KB  |  199 lines

  1.  
  2.  
  3.                                  PRINTER.DOC                    Ver 1.1
  4.  
  5.                                  John Petrey
  6.                                   (c) 1983                                  
  7.  
  8.         This  is  the documentation file for the PRINTER.COM  program,  a 
  9.         program that allows one to easily use the special print functions 
  10.         for  their printer (any make).   PRINTER.COM is run by typing  in 
  11.         PRINTER at the DOS prompt or directly from Wordstar using the "R" 
  12.         (run a program) command.
  13.  
  14.         PRINTER.COM  is  used to set up your printer to make use of  it's 
  15.         special print functions (compressed print,  double strike  print, 
  16.         italics print,  etc.)  For example,   you may have a printer that 
  17.         normally only prints 80 characters on a line,  which is fine most 
  18.         of  the  time.   However,  you may find times when you'd like  to 
  19.         print more than 80 characters on a line.  You can use PRINTER.COM 
  20.         to tell your printer to use compressed print.    Likewise, if you  
  21.         normally use continuous form paper,  then you want the printer to 
  22.         stop printing  when it runs out of paper.   But when you want  to 
  23.         use  single sheet paper,  the printer stops because it thinks  it 
  24.         doesn't have any paper in the printer.   PRINTER.COM can tell the 
  25.         printer to temporarily ignore the paper out sensor so you can use 
  26.         single sheet paper.   Whatever your printer has the capability to 
  27.         do, you can easily do it with PRINTER.COM.
  28.  
  29.         To use PRINTER.COM you must set up a data file for PRINTER.COM to 
  30.         read  so it knows what special print functions you want  to  use. 
  31.         You  can enter up to ten different special print features in  the 
  32.         data  file.   The  data file must be named PRINTER.DAT  and  must 
  33.         conform  to  a specific format so PRINTER.COM can understand  it.  
  34.  
  35.         When you run  PRINTER.COM,  it looks for the  PRINTER.DAT file on 
  36.         the default disk drive unless you tell  PRINTER.COM  that the DAT
  37.         file is located on some other disk drive.    You tell PRINTER.COM
  38.         the drive the  DAT file is located on by typing in the disk drive
  39.         letter after you type in PRINTER at the DOS prompt.  For example,
  40.         if the  default  drive is  A  and  PRINTER.COM  is on drive B and   
  41.         PRINTER.DAT is on drive C, you would type in  B:PRINTER C  at the
  42.         DOS A> prompt so DOS would know to look on drive B for PRINTER.COM
  43.         and so PRINTER.COM would know to look on drive C for PRINTER.DAT.
  44.  
  45.         The  data file (PRINTER.DAT) must contain a description (literal) 
  46.         of  the special print features you want to be available  and  the 
  47.         printer  control  codes  for each  special  print  feature.   The 
  48.         control  codes  are listed in your printer's user manual and  are 
  49.         likely found in the back of the manual as an appendix.  A control 
  50.         code  is  nothing  more  than  a unique  code  that  the  printer 
  51.         recognizes as a command to change to a special print mode.
  52.          
  53.         Let's assume you have an Epson MX printer and want to be able  to 
  54.         set up the printer for compressed print.   According to the Epson 
  55.         manual  (appendix B in my Epson manual) the control code to  turn 
  56.         on  compressed print is 15 (the ASCII character 15).  To  set  up 
  57.         your  PRINTER.DAT  file for compressed print on an Epson  printer 
  58.         you would need an entry like the following:
  59.  
  60.              Compressed Print$015000
  61.  
  62.  
  63.                                   Page 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.         The  first  part  of the entry is what you want  printed  on  the 
  71.         screen,  Compressed Print in this case.  Following the literal is 
  72.         a  dollar sign ($) which tells PRINTER.COM where the end of  your 
  73.         literal is and where the beginning of the codes are that you want 
  74.         sent  to  the  printer to turn on  that  special  print  feature.  
  75.         Following the dollar sign are six digits which to PRINTER.COM are 
  76.         really  two three-digit numbers.   The first three digits in this 
  77.         case  are  015  which  will be sent to the  printer  to  turn  on 
  78.         compressed print.   The last three digits (000 in this case) will 
  79.         not  be  sent  to the printer because  it  is  000.   PRINTER.COM 
  80.         expects two three-digit numbers,  so in this case we had to enter 
  81.         000   as   one  of  the  two  three-digit  numbers   to   satisfy 
  82.         PRINTER.COM's  requirement  for two  three-digit  numbers.   Many 
  83.         special print functions require two control codes be sent to  the 
  84.         printer  in order to set up a special print function,  so that is 
  85.         why PRINTER.COM wants two-three digit numbers.   For example,  on 
  86.         the Epson Printer,  to set up Italics print you need to send  the 
  87.         printer  a  ESC (escape) and a 53 (according to my Epson  Printer 
  88.         manual,  Appendix  B).   You would enter  your  literal,  Italics 
  89.         Print,  followed by a dollar sign followed by 027053.  027 is the 
  90.         ASCII code for Escape  and  053 is the code  for  Italics.  Thus,  
  91.         the entry in the PRINTER.DAT file would look like:
  92.               
  93.               Italics Print$027053
  94.  
  95.         Up  to  ten different special print functions can be  entered  in 
  96.         the PRINTER.DAT file and each should be on separate  lines.   The 
  97.         last  entry  should be followed by an ampersand  (&)  immediately 
  98.         after  the last digit of the last code.  The ampersand (&)  tells 
  99.         PRINTER.COM  when  it has  reached the end of your  special print
  100.         features.   For  example,  if you only  had two  entries  in your 
  101.         PRINTER.DAT file it might look like:
  102.  
  103.               Compressed Print$015000
  104.               Italics Print$027053&
  105.  
  106.         Remember,  1) you can have up to 10 entries in PRINTER.DAT
  107.          
  108.                    2) each entry is comprized of:
  109.  
  110.                         a. literal followed by dollar sign
  111.                         b. followed  by two three-digit codes  (decimal
  112.                            ASCII value - not hex)  that  are to be sent   
  113.                            to the printer   (Refer  to  your  printer's
  114.                            manual for the  control codes  to set up the 
  115.                            special print features you want to use.)  If
  116.                            your  printer  manual says to  send a  alpha 
  117.                            character to the  printer,  you can find out
  118.                            what  ASCII  code should be sent by refering 
  119.                            to the IBM-PC BASIC manual appendix G.                 
  120.  
  121.                    3) The last  digit  of last code is followed  by  an 
  122.                       ampersand  (&)  so  PRINTER.COM knows when it has 
  123.                       reached the last of your special print features.  
  124.                                                                         
  125.  
  126.  
  127.  
  128.                                 Page 2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.         The  PRINTER.DAT  file  can be created with  any  editor  (Edlin, 
  138.         Wordstar,  directly from the console, etc.).  Just be sure if you 
  139.         use  Wordstar  that you create/edit the PRINTER.DAT file  in  the 
  140.         non-document  mode.   A  sample PRINTER.DAT file  (for  an  Epson 
  141.         printer) is provided as an example.
  142.  
  143.  
  144.         PRINTER.COM  can  be  run  from Wordstar by using the  R  (run  a 
  145.         program) command from the Wordstar Menu.  For example, assume you 
  146.         just finished editing a document and have saved it.   You  should 
  147.         now  be at the Opening Menu where you normally would strike P  to 
  148.         begin printing the document.   Before printing the document,  you 
  149.         can  strike  R for run a program at which time Wordstar will  ask 
  150.         you for the name of the program you wish to run.  Type in PRINTER 
  151.         and  strike the enter key.   Note:  if PRINTER.COM is not on  the 
  152.         logged  (default) disk drive you'll need to prefix  PRINTER  with 
  153.         the  drive  specification  of the drive where Wordstar  can  find 
  154.         PRINTER.COM  (such as A:  for drive A).  If PRINTER.DAT is not on
  155.         the default disk drive, you'll need to specify the drive where it
  156.         can be found after entering PRINTER.  For example, if the default
  157.         drive is B: and both PRINTER.COM and PRINTER.DAT are on drive A:,
  158.         then you'll need to enter   A:PRINTER A   so  Wordstar  will know
  159.         where to look for PRINTER.COM  and PRINTER.COM will know where to
  160.         look for  PRINTER.DAT.   After you've entered this, Wordstar will
  161.         run the PRINTER.COM program which will prompt you for the special
  162.         print  functions  you  set  up in your  PRINTER.DAT  file.   Upon
  163.         exiting  PRINTER.COM,   you will automatically return to Wordstar
  164.         where  you  can now strike P to begin printing your document with
  165.         the special print function(s) you selected in effect.      
  166.  
  167.  
  168.         Listed below is a sample PRINTER.DAT file for an EPSON printer.
  169.  
  170.         Set Printer to Power Up Mode$027064
  171.         Compressed Print$027015
  172.         Italics Print$027052
  173.         Emphasized Print$027069
  174.         Double Strike Print$027071 
  175.         1/8th Inch Spacing$027048
  176.         Turn on Paper Out Sensor$027057
  177.         Turn off Paper Out Sensor$027056
  178.         Double Width Print #1$027087
  179.         Double Width Print #2$001000&
  180.  
  181.         Note: To use Double Width Print,  both Double Width options 
  182.               in the above sample must be entered.  This is because
  183.               the Epson printer needs three control codes to set up
  184.               Doulbe Width print.   Since PRINTER.COM can only have
  185.               two control codes per entry in the  PRINTER.DAT file,
  186.               two entries in  PRINTER.DAT  are required to send the 
  187.               three control codes the Epson printer wants.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                                Page 3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.